/*
** my_putnbr_double.c for libmy in /home/goupil_r/tek2ed/my_printf/src
** 
** Made by robin goupil
** Login   <goupil_r@epitech.net>
** 
** Started on  Sun Nov 18 12:03:25 2012 robin goupil
** Last update Sun Nov 18 12:03:41 2012 robin goupil
*/

#include "my.h"

int		my_putnbr_double(double nbr)
{
  my_put_nbr((int)nbr);
  nbr = (nbr - (int)nbr) * 1000000;
  if (nbr < 0)
    return (2);
  my_putchar('.');
  while ((int)nbr % 10 == 0)
    nbr = nbr / 10;
  my_put_nbr((int)nbr);
  return (2);
}
